import java.util.Scanner;
public class Test3 {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while (scanner.hasNextLine()) {
			String string = scanner.nextLine();
			int ans = 0;
			for(int i = 0; i < string.length(); i++)
				if (Character.isDigit(string.charAt(i)))
					ans += string.charAt(i) - '0';
			System.out.println(ans);
		}
		scanner.close();
	}
}
